import java.awt.Color;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class Starter implements MouseListener
{

	public static void main(String[] args)
	{
		new Starter();
	}

	JPanel p;

	public Starter()
	{
		JFrame f = new JFrame();
		p = new JPanel();

		f.setContentPane(p);
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		f.setSize(100, 200);

		p.setBackground(new Color(255, 255, 0));

		f.addMouseListener(this);

		f.setVisible(true);
	}

	public void mouseReleased(MouseEvent arg0)
	{
		int r = (int) (Math.random() * 255);
		int g = (int) (Math.random() * 255);
		int b = (int) (Math.random() * 255);

		p.setBackground(new Color(r, g, b));
	}

	@Override
	public void mouseClicked(MouseEvent arg0)
	{
		// TODO Auto-generated method stub

	}

	@Override
	public void mouseEntered(MouseEvent arg0)
	{
		// TODO Auto-generated method stub

	}

	@Override
	public void mouseExited(MouseEvent arg0)
	{
		// TODO Auto-generated method stub

	}

	@Override
	public void mousePressed(MouseEvent arg0)
	{
		// TODO Auto-generated method stub

	}
}
